package com.itheima.HomeWork.Exer;

import java.io.File;

public class Fi04 {
    public static void main(String[] args) {
        File f = new File("E:\\ttt");
        Shanc(f);
    }

    public static void Shanc(File s) {
        File[] fi = s.listFiles();
        for (File file : fi) {
            if (file != null) {
                if (file.isFile()) {
                    file.delete();
                } else {
                    Shanc(file);
                }
            }
            file.delete();

        }

    }
}
